
uplus:

 tsx
 clc
 adc $102,x
 sta $102,x
 vmnext_pla

twostore:

 tax
 pla
 sta 0,x
 pla
 sta 1,x
 vmnext_pla


enum TEMP
 NX: .db 0
 NY: .db 0
 PX: .db 0
 PY: .db 0
ende

solid_obj_move: colon
   semi

do_player_control: colon
   .dw zero
   .dw dup
   .dw twodup
   .dw vxstore
   .dw vystore
   .dw andcase
   .dw PAD_LEFT
   mif +l
   .dw twolit
   .dw $FFEC
   .dw vxstore
   .dw exit
+l
   .dw andcase
   .dw PAD_RIGHT
   mif +l
   .dw twolit
   .dw $14
   .dw vxstore
   .dw exit
+l
   .dw andcase
   .dw PAD_UP
   mif +l
   .dw twolit
   .dw $FFEC
   .dw vystore
   .dw exit
+l
   .dw andcase
   .dw PAD_DOWN
   mif +l
   .dw twolit
   .dw $14
   .dw vystore
   .dw exit
+l
   semi

load_overworld_screen: colon
   .dw lit
   .dw OVERWORLD_POS
   .dw fetch
   .dw load_screen
   semi

do_player_world: colon
   .dw xfetch
   .dw dropdup
   .dw lit
   .dw $F
   .dw greater
   mif +l
   .dw drop
   .dw lit
   .dw $1
   .dw lit
   .dw OVERWORLD_POS
   .dw plusstore
   .dw zero
   .dw dup
   .dw xstore
   .dw load_overworld_screen
   .dw exit
+l
   .dw lit
   .dw $FF
   .dw less
   mif +l
   .dw lit
   .dw $FF
   .dw lit
   .dw OVERWORLD_POS
   .dw plusstore
   .dw twolit
   .dw $F00
   .dw xstore
   .dw load_overworld_screen
   .dw exit
+l
   .dw yfetch
   .dw dropdup
   .dw lit
   .dw $B
   .dw greater
   mif +l
   .dw drop
   .dw lit
   .dw $4
   .dw lit
   .dw OVERWORLD_POS
   .dw plusstore
   .dw zero
   .dw dup
   .dw ystore
   .dw load_overworld_screen
   .dw exit
+l
   .dw lit
   .dw $FF
   .dw less
   mif +l
   .dw lit
   .dw $FC
   .dw lit
   .dw OVERWORLD_POS
   .dw plusstore
   .dw twolit
   .dw $B00
   .dw ystore
   .dw load_overworld_screen
   .dw exit
+l
   semi

doplayer: colon
   .dw zero
   .dw padstate
   .dw do_player_control
   .dw drop
   .dw vxfetch
   .dw xfetch
   .dw dplus
   .dw xstore
   .dw vyfetch
   .dw yfetch
   .dw dplus
   .dw ystore
   .dw do_player_world
   .dw screenxy
   .dw twolit
   .dw ms_player_idle_right
   .dw metaspr
   .dw oplus
   semi
